package com.zhiyume.api.controller;

import com.zhiyume.service.RedisService;
import com.zhiyume.util.TypeConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestHeader;
import springfox.documentation.annotations.ApiIgnore;

/**
 * Created by wang on 17/11/20.
 */
@Controller
@ApiIgnore
public class AppBaseAction {

    @Autowired
    private RedisService redisService;

    public boolean ifLogin(String token){
        return redisService.getUserId(token) > -1;
    }
}
